WWF No Mercy Custom Music with PJ64 + PowerShell
Written with ChatGPT, troubleshooting by RetroRandyPrice

Tested and working with PJ64 3.0.1
https://www.pj64-emu.com/public-releases

This setup replaces the in-game music with your own MP3 files. Each track is triggered by a value in game memory and played on your PC.
The PJ64 JavaScript writes the current music value to "n64_song.txt". PowerShell reads the .txt file and determines what mp3 to play from the N64 Music folder.

Copy the "Temp" folder to the root of your C drive. If you place it somewhere else, you'll need to open and edit the .ps1 and .js files.

1. Allow PowerShell scripts
By default, Windows blocks .ps1 files. You only need to do this once:
Right-click the Start menu → choose Windows PowerShell (Admin).
Paste this command and press Enter:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

When asked, type Y or A (so it doesn't ask again) and press Enter.
This only affects your account, not the whole system. It just lets you run local scripts like our watcher.

2. Set up the music folder
Create a folder:
C:\Temp\N64 Music\
Place your custom MP3s inside.
Each file must be named with the HEX value used by the game (e.g., 0E.mp3, 2A.mp3, 14.mp3).
Uppercase letters are recommended.

3. Add JavaScript to "Scripts" Folder
Create a "Scripts" folder in the root of your Pj64 folder if it isn't there already.
Place the "no mercy mp3 playback.js" file in the Scripts folder.

4. Load it up!
Add this Mute Music code:
WWF No Mercy:
Mute Music
50008F02 0000
8104817A 0001
NM+:
50006D02 0000
81470702 FFFF

Make sure your PJ64 Debugger is available.
Options\Configuration\General Settings\Advanced
Check "Enable debugger"

Each time you start WWF No Mercy:
Open Script:
Debugger\Scripts...\
Double Click "no mercy mp3 playback.js"

Right click the "nomercy_mp3_watcher.ps1" file and select "Run with PowerShell"

PowerShell will display the HEX value that it's attempting to play. Name your mp3 files the name is provides.

Play — when the game sets music IDs, your MP3s will play instead.

Exit PowerShell with Ctrl+C